@include('backstage/public/_header')
    <style>
        .add_tab td span #thume {
            line-height: 100px;
            color: #d94040;
            font-size: 14px;
            text-align: center;
        }
    </style>
    <div class="result_wrap">
        <form id="form_data">
            {{csrf_field()}}
            <input type="hidden" name="id" value="{{$withdraw->id}}" />
            <table class="add_tab">
                <tbody>
                    <tr>
                        <th>提現金額：</th>
                        <td>
                        {{$withdraw->money}} <span style="color:red;"> HK</span>
                        </td>
                    </tr>
                    <tr>
                        <th>姓名：</th>
                        <td>
                            {{$user->family}}{{$user->name}}
                        </td>
                    </tr>
                    <tr>
                        <th>提現銀行：</th>
                        <td>
                        {{$withdraw->bank_name}}
                        </td>
                    </tr>
                    <tr>
                        <th>提現卡號：</th>
                        <td>
                            {{$withdraw->bank_num}}
                        </td>
                    </tr>
                    <tr>
                        <th>發生日期：</th>
                        <td>
                            @if($withdraw->add_time!=0) {{date('Y-m-d H:i:s',$withdraw->add_time)}} @endif
                        </td>
                    </tr>
                    <tr>
                        <th>審核提现：</th>
                        <td>
                            <label for=""><input type="radio" value="0" name="status" @if($withdraw->status==0) checked="checked" @endif>{{$withdraw_status[0]}}</label>
                            <label for=""><input type="radio" value="1" name="status" @if($withdraw->status==1) checked="checked" @endif>{{$withdraw_status[1]}}</label>
                            <label for=""><input type="radio" value="2" name="status" @if($withdraw->status==2) checked="checked" @endif>{{$withdraw_status[2]}}</label>
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="btn_group">
                <input type="button" value="提交" id="btnSub" onclick="onSubmit();">
                <input type="button" class="back" onclick="history.go(-1)" value="返回">
            </div>
        </form>
        <div class="tips">
            <h3>審核提現說明</h3>
            <p>1、點擊提交 -&gt; 審核訂單，返回-&gt; 回到提現審核列表</p>
        </div>
    </div>
    <script type="text/javascript">
        var vfTime = 2;
        var timer=null;
        function setTime(){
            vfTime --;
            if(vfTime<=0){
                vfTime = 0;
                clearInterval(timer);
            }
        }
        function onSubmit(){
            if (vfTime!=0 && timer!=null){
                layer.msg('操作過於頻繁', {icon: 7,anim: 6});
                // setTimeout(function(){$("#chiContent").focus();}, 1500);
                return false;
            }
            var form = new FormData(document.getElementById("form_data"));
//             var req = new XMLHttpRequest();
//             req.open("post", "${pageContext.request.contextPath}/public/testupload", false);
//             req.send(form);
            $.ajax({
                url:"{{$doedit}}",
                type:"post",
                data:form,
                processData:false,
                contentType:false,
                dataType : "json",
                success:function(data){
                    if(data.status==1){
                        layer.msg(data.message, {icon: 6});
                        setTimeout(function(){
                            window.location.href=data.jumpUrl;
                        },2000);
                    }else if(data.status==-1){
                        layer.alert(data.message, {icon: 2,anim:6});
                    }else{
                        layer.msg(data.message, {icon: 5});
                    }
                    
                    clearInterval(timer);
                    timer = setInterval(setTime, 1000, "1");
                    
                },
                error:function(e){
                    layer.msg(e, {icon: 5,anim: 6});
                    clearInterval(timer);
                    timer = setInterval(setTime, 1000, "1");
                }
            });
        }
    </script>
@include('backstage/public/_footer')